A social-networking system, which may include a social-networking website, may enable its users (such as persons or organizations) to interact with it and with each other through it. The social-networking system may, with input from a user, create and store in the social-networking system a user profile associated with the user. The user profile may include demographic information, communication-channel information, and information on personal interests of the user. The social-networking system may also, with input from a user, create and store a record of relationships of the user with other users of the social-networking system, as well as provide services (e.g. wall posts, photo-sharing, event organization, messaging, games, or advertisements) to facilitate social interaction between or among users.
The social-networking system may send over one or more networks content or messages related to its services to a mobile or other computing device of a user. A user may also install software applications on a mobile or other computing device of the user for accessing a user profile of the user and other data within the social-networking system. The social-networking system may generate a personalized set of content objects to display to a user, such as a newsfeed of aggregated stories of other users connected to the user.
A mobile computing device—such as a smartphone, tablet computer, or laptop computer—may include functionality for determining its location, direction, or orientation, such as a GPS receiver, compass, or gyroscope. Such a device may also include functionality for wireless communication, such as BLUETOOTH communication, near-field communication (NFC), or infrared (IR) communication or communication with a wireless local area networks (WLANs) or cellular-telephone network. Such a device may also include one or more cameras, scanners, touchscreens, microphones, or speakers. Mobile computing devices may also execute software applications, such as games, web browsers, or social-networking applications. With social-networking applications, users may connect, communicate, and share information with other users in their social networks.
Summary Of Particular Embodiments
In particular embodiments, multiple ambient-location readings from the location service of a mobile device may be filtered and grouped to suppress location data noise and reduce the amount of location data that is stored. In particular embodiments, ambient-location readings may be clustered using a spatial-clustering algorithm, such as for example k-means algorithm. The spatial-clustering algorithm clusters a large number of spatial readings into a smaller number of spatial centers based on the distance between the location of the ambient-location reading and the location of the nearest cluster. Subsequent ambient-location readings may be used to refine the accuracy of the spatial clusters. Subsequent ambient-location readings may be added to an existing cluster based on whether the distance between the location of the ambient-location reading and the location of the nearest cluster is less than a pre-determined threshold. Otherwise, the new reading may be kept separate from existing clusters.